﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WhereAreMyStaff.Services.Mobile;

namespace Passbook.Sample.Web.Controllers
{
    public class UpdateController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public ActionResult Index(string deviceIdentifier)
        {
            iPhoneMobileNotificationService service = new iPhoneMobileNotificationService();
            service.SendEmptyPushNotification(deviceIdentifier, GetAppleAPNCertificateThumbprint());
            return View();
        }

        private string GetAppleAPNCertificateThumbprint()
        {
            return "21792c2699544643655ad561a145147223ec37b2";
        }
    }
}
